finding magnitude